package com.qinggeng.project.system.service.impl;

import com.qinggeng.project.api.dto.UserBindGsdDto;
import com.qinggeng.project.system.domain.UserBindGsd;
import com.qinggeng.project.system.mapper.UserBindGsdMapper;
import com.qinggeng.project.system.service.UserBindGsdService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * @author 吴鹏飞
 * @date 2020/10/20
 */
@Service
public class UserBindGsdServiceImpl implements UserBindGsdService {
    @Resource
    private UserBindGsdMapper userBindGsdMapper;

    @Override
    public List<UserBindGsdDto> selectUserBindGsdInfoByUserId(Long userId) {
        return userBindGsdMapper.selectUserBindGsdInfoByUserId(userId);
    }

    @Override
    public int untieById(Long id) {
        return userBindGsdMapper.updateIsbindById(id);
    }

    @Override
    public UserBindGsd selectUserBindGsdByUserIdAndPlatform(Long userId, String platform) {
        return userBindGsdMapper.selectUserBindGsdByUserIdAndPlatform(userId,platform);
    }

    @Override
    public int updateUserBindGsd(UserBindGsd userBindGsd) {
        return userBindGsdMapper.updateUserbindGsd(userBindGsd);
    }
}
